package phapp.dao.qfd;

import java.util.List;
import java.util.Map;

import javacommon.base.*;
import cn.org.rapid_framework.page.*;

import org.springframework.stereotype.Component;

import phapp.model.qfd.*;

/**
 * Title: t_custqfd_data 数据处理层 Description :
 * 执行./mapper/的CustqfdMapper.xml的相应SQL语句 Copyright: Copyright (c) 2012-10
 * Company:
 * 
 * @author you name
 * @version 1.0
 */

@Component
public class CustqfdDao extends BaseIbatis3Dao<Custqfd, java.lang.Integer>
{

   public Class getEntityClass()
   {
      return Custqfd.class;
   }

   public void saveOrUpdate(Custqfd entity)
   {
      if(entity.getCustqfdId() == null) save(entity);
      else update(entity);
   }

   /**
    * <p>
    * 批量删除<br>
    * Description :
    * 
    * @param Custqfd
    *           u
    * @return int
    * @author
    */
   public int removeByIdArry(Custqfd u)
   {
      int i = -1;
      i = delete("Custqfd.removeByIdArry", u);
      return i;
   }

   /**
    * <p>
    * 分页查询<br>
    * Description :
    * 
    * @param PageRequest
    *           pageRequest
    * @return Page
    * @author
    */
   public Page findByPageRequest(PageRequest pageRequest)
   {
      return pageQuery("Custqfd.pageSelect", pageRequest);
   }

   public List findNearList(Map map)
   {
      List listResult = getSqlSessionTemplate().selectList("Custqfd.findNearList", map);
      return listResult;
   }

   public List findLatestList(Map map)
   {
      List listResult = getSqlSessionTemplate().selectList("Custqfd.findLatestList", map);
      return listResult;
   }
   
}
